<%@ page language="java" contentType="text/html"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Login</title>
<link href="css/login-box.css" rel="stylesheet" type="text/css" />

<script language="javascript" src="javascript/md5.js"></script>
<script language="javascript">
	function passResponse() {
		document.hform.name.value = document.login.user_temp.value;
		document.hform.p1.value = MD5(document.login.pass_temp.value
				+ document.login.user_temp.value);
		document.login.pass_temp.value = "";
		document.hform.submit();
	}
</script>

</head>
<body>


	<div style="padding: 100px 0 0 250px;">
		<div id="login-box">

			<H2>Login</H2>
			<br /> <br />

			<div id="login-box-name" style="margin-top: 20px;">Name:</div>
			<form name="login">
				<div id="login-box-field" style="margin-top: 20px;">
					<input type="text" name="user_temp" class="form-login" value=""
						size="30" maxlength="40" />
				</div>
				<div id="login-box-name">Password:</div>
				<div id="login-box-field">
					<input name="pass_temp" type="password" class="form-login" value=""
						size="30" maxlength="40" />
				</div>
				<br> <input type="image" name="submitbtn"
					src="images/button_login.png"
					onClick="passResponse(); return false;" width="103" height="42"
					style="margin-left: 90px;" />
			</form>

			<form action="Login" METHOD="GET" name="hform">
				<input type="hidden" name="name"> <input type="hidden"
					name="p1"> <input style="display: none" type="password"
					name="register" value="false" size="20" />
			</form>
			<a href=Login?to=register><font color="yellow">Register</font>
			</a>
			<c:if test="${!empty errorMessage}">
				<font color="red"><b>${errorMessage}</b>
				</font>
			</c:if>
			<c:if test="${!empty info}">
				<b>${info}</b>
			</c:if>
			<br />

		</div>

	</div>

</body>
</html>